package com.mercycrazy.springframework.beans.factory.support;

import com.mercycrazy.springframework.beans.BeansException;
import com.mercycrazy.springframework.beans.factory.config.BeanDefinition;

import java.lang.reflect.Constructor;

/**
 * Bean 实例化策略接口
 *
 * @author <a href="mailto:1443424326@qq.com">mercycrazy</a>
 * @since 2022-11-24
 */
public interface InstantiationStrategy {

    Object instantiate(BeanDefinition beanDefinition, String beanName,
                       Constructor<?> ctor, Object[] args) throws BeansException;
}
